/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.pub.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.pub.dao.AddressInfoDao;
import com.thinkgem.jeesite.modules.pub.entity.AddressInfo;
import com.thinkgem.jeesite.modules.sys.service.AreaService;

/**
 * 企业地址信息Service
 * @author wzl
 * @version 2018-10-12
 */
@Service
@Transactional(readOnly = true)
public class AddressInfoService extends CrudService<AddressInfoDao, AddressInfo> {

	@Autowired
	private AreaService areaService;
	public AddressInfo get(String id) {
		return super.get(id);
	}
	
	public List<AddressInfo> findList(AddressInfo addressInfo) {
		return super.findList(addressInfo);
	}
	
	public Page<AddressInfo> findPage(Page<AddressInfo> page, AddressInfo addressInfo) {
		return super.findPage(page, addressInfo);
	}
	
	@Transactional(readOnly = false)
	public void save(AddressInfo addressInfo) {
		super.save(addressInfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(AddressInfo addressInfo) {
		super.delete(addressInfo);
	}
	
	@Transactional(readOnly = false)
	public void saveAddress(AddressInfo addressInfo,String entId,String tableName) {
		addressInfo.setTableId(entId);
		addressInfo.setTableName(tableName);
		super.save(addressInfo);
	}
	
}